package com.acwing.partition36;

import java.io.*;

/**
 * @author rkc
 * @date 2022/8/8 9:32
 */
public class AC3596A加B {

    private static final BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
    private static final BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(System.out));

    public static void main(String[] args) throws IOException {
        while (true) {
            String s = reader.readLine();
            if (s == null || s.isEmpty()) break;
            String[] ss = s.split(" ");
            writer.write(add(reverse(ss[0]), reverse(ss[1])) + "\n");
        }
        writer.flush();
    }

    private static String add(String a, String b) {
        StringBuilder c = new StringBuilder();
        int t = 0;
        for (int i = 0; i < a.length() || i < b.length(); i++) {
            if (i < a.length()) t += a.charAt(i) - '0';
            if (i < b.length()) t += b.charAt(i) - '0';
            c.append(t % 10);
            t /= 10;
        }
        while (t != 0) {
            c.append(t % 10);
            t /= 10;
        }
        return c.reverse().toString();
    }

    private static String reverse(String s) {
        char[] res = s.toCharArray();
        int i = 0, j = res.length - 1;
        while (i < j) {
            char t = res[i];
            res[i] = res[j];
            res[j] = t;
            i++;
            j--;
        }
        return new String(res);
    }
}
